package org.emp.handler;

import org.emp.common.Result;
import org.emp.exception.LoginException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
/**
 * 加油
 *
 * @author konglingfeng
 * @date 2025/8/9
 * @desc
 */
@RestControllerAdvice
public class GlobalExceptionHandler {

    @ExceptionHandler(LoginException.class)
    public Result<String> loginException(LoginException e) {
        return Result.error(e.getErrorCode(),e.getMessage());
    }

}
